//priority 100000
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingHurtEvent", event => {
    global.attack(event)
    global.defense(event)

    global.LivingHurtEvent(event)
    if (global.LivingHurtEvent$ServerSide) {
        global.LivingHurtEvent$ServerSide(event)
    }
})

ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingHealEvent", event => {
    if (typeof global.heal === "function") {
        global.heal(event)
    }
    if (typeof global.LivingHealEvent$ServerSide === "function") {
        global.LivingHealEvent$ServerSide(event)
    }
})

ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent", event => {
    if (global.LivingEquipmentChangeEvent$ServerSide) {
        global.LivingEquipmentChangeEvent$ServerSide(event)
    }
})

ForgeEvents.onEvent("net.minecraftforge.event.entity.player.ItemTooltipEvent", event => {
    if (global.ItemTooltipEvent$ClientSide) {
        global.ItemTooltipEvent$ClientSide(event)
    }
})


//实体被攻击事件 Client Server
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingAttackEvent", event => {
    global.LivingAttackEvent(event)
})



//玩家攻击(近战)事件 Client Server
ForgeEvents.onEvent("net.minecraftforge.event.entity.player.AttackEntityEvent", event => {
    global.AttackEntityEvent(event)
})


//玩家使用物品事件(Start) Client Server
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingEntityUseItemEvent$Start", event => {
    global.LivingEntityUseItemEvent$Start(event)
})
//玩家使用物品事件(tick) Client Server
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingEntityUseItemEvent$Tick", event => {
    global.LivingEntityUseItemEvent$Tick(event)
})
//玩家使用物品事件(Stop) Client Server
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingEntityUseItemEvent$Stop", event => {
    global.LivingEntityUseItemEvent$Stop(event)
})
//玩家使用物品事件(Finish) Client Server
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingEntityUseItemEvent$Finish", event => {
    global.LivingEntityUseItemEvent$Finish(event)
})

//爆炸事件
ForgeEvents.onEvent("net.minecraftforge.event.level.ExplosionEvent", event => {
    global.ExplosionEvent(event)
})
//药水事件
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.MobEffectEvent$Remove", event => {
    global.MobEffectEvent$Remove(event)
})
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.MobEffectEvent$Expired", event => {
    global.MobEffectEvent$Expired(event)
})
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.MobEffectEvent$Added", event => {
    global.MobEffectEvent$Added(event)
})
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.MobEffectEvent$Applicable", event => {
    global.MobEffectEvent$Applicable(event)
})